// 
import request from '../utils/request.js';

/**
 * 配置查询
 * GET
 * /public/config/{key}
  */
 export let ConfigurationQuery = (key)=>{
	 return request({
		 url:`/api/public/config/${key}`,
		 method:'GET'
	 })
 }
 
 /**
  * 查询配置列表
  * GET
  * /public/config/list
 */
export let QueryConfigurationList = ()=>{
	return request({
		url:'/api/public/config/list',
		method:'GET'
	})
}

/**
 * 创建并查看查询
 * POST
 * /inner/report/maintenance
  */
export let CreateViewQueries = (data)=>{
	return request({
		url:'/api/inner/report/maintenance',
		method:'POST',
		data:data
	})
}

/**
 * 事故报告
 * POST
 * /inner/report/accident
  */
export let AccidentReport = (orderSn,data)=>{
	return request({
		url:`/api/inner/report/accident/${orderSn}`,
		method:"POST",
		data:data
	})
}

/**
 * 维保报告
 * POST
 * /inner/report/maintenance/{orderSn}
 */
export let MaintenanceReport = (orderSn,data) =>{
	return request({
		url:`/api/inner/report/maintenance/${orderSn}`,
		method:'POST',
		data:data
	})
}

/**
 * 查询过去的结果
 * GET
 * /inner/report/getReport/{orderId}
  */
 export let QueryPastResults = (orderId)=>{
	 return request({
		 url:`/api/inner/report/getReport/${orderId}`,
		 method:'GET'
	 })
 }
 
 /**
  * 创建订单
  * POST
  * /inner/order/{type}
 */
export let CreateAnOrder = (type,count)=>{
	return request({
		url:`/api/inner/order/${type}?count=${count}`,
		method:'POST'
	})
}

/**
 * 未处理的订单
 * GET
 * /inner/order/hashPayOrder/{typeId}
  */
 export let UnprocessedOrders = (typeId)=>{
	 return request({
		 url:`/api/inner/order/hashPayOrder/${typeId}`,
		 method:'GET'
	 })
 }
 
 /**
  * 查询历史成功的订单
  * GET
  * /inner/order/page/successOrder
 */
export let QueryHistorySuccessfulOrders = (data)=>{
	return request({
		url:'/api/inner/order/page/order',
		method:'GET',
		data:data
	})
}

/**
 * 公众号登录
 * GET
 * /public/login/mpLogin
  */
 export let PublicAccountLogin = (code)=>{
	 return request({
		 url:`/api/public/login/mpLogin?code=${code}`,
		 method:'GET'
	 })
 }
 
 /**
  * 用户数据修改
  * POST
  * /public/login/updateUser
 */
export let UserDataModification = (data)=>{
	return request({
		url:'/api/public/login/updateUser',
		method:'POST',
		data:data
	})
}

/**
 * 协议查询
 * POST
 * /api/public/agreement/getAgrrement
  */
 export let ProtocolQuery = ()=>{
	 return request({
		 url:'/api/public/agreement/getAgrrement',
		 method:"GET"
	 })
 }
 
/**
 * 获取样例
 * GET
 * /public/example/getExample
  */
 export let SampleObtained = ()=>{
	 return request({
		 url:'/api/public/example/getExample',
		 method:"GET"
	 })
 }
 
 /**
  * 获取首单反免信息
  * GET
  * /inner/order/getFirstOrderInfo
 */
export let FirstSLRFree = ()=>{
	return request({
		url:'/api/inner/order/getFirstOrderInfo',
		method:'GET'
	})
}

/**
 * 确认订单次数消耗
 * PUT
 * /inner/order/confirmOrder/{orderSn}
  */
 export let ConfirmedOrderTimesConsumed = (orderSn)=>{
	 return request({
		 url:`/api/inner/order/confirmOrder/${orderSn}`,
		 method:'PUT'
	 })
 }
 
 /**
  * 图片VIn识别
  * POST
  * /inner/order/ocr
 */

export let PostVin = (data)=>{
	return request({
		url:'/api/inner/order/ocr',
		method:'POST',
		data:data
	})
}

/**
 * 订单记录
 * GET
 * /inner/reportLog/getOrderLog
  */
 export let OrderRecord = (data)=>{
	 return request({
		 url:'/api/inner/reportLog/getOrderLog',
		 method:'GET',
		 data:data
	 })
 }
 
 /**
  * 查询报告记录 status、type、userId(固定)、statusList
  * GET
  * /inner/reportLog/getReportLog
 */
export let QueryReportRecord = (data)=>{
	return request({
		url:'/api/inner/reportLog/getReportLog',
		method:'GET',
		data:data
	})
}

/**
 * 获取二维码
 * GET
 * /inner/qrc
  */
 export let getQrCode = ()=>{
	 return request({
		 url:'/api/inner/qrc',
		 method:'GET'
	 })
 }
 
 /**
  * 签名
  * GET
  * /public/config/getSing
 */
export let signature = (url)=>{
	return request({
		url:`/api/public/config/getSing?url=${url}`,
		method:'GET'
	})
}

/**
 * 分享参数
 * GET
 * 分享参数
  */
 export let SharingParameter = (type)=>{
	 return request({
		 url:`/api/public/config/share/${type}`,
		 method:'GET'
	 })
 }